]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Use correct view for animation
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 17 Nov 2016 15:24:44 +0000 (16:24 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 23 Nov 2016 21:11:00 +0000 (22:11 +0100)
We currently assume that the current view matches the 'app-picker-view'
setting. While that is usually the case, there is one notable exception:
While there isn't sufficient usage data (yet), we show all applications
instead of an empty frequent view regardless of the setting. We should
animate the actually visible icons in that case, not the (non-existent)
ones from the hidden frequent view.

https://bugzilla.gnome.org/show_bug.cgi?id=774381

js/ui/appDisplay.js

index f81ab593e4aff64d0b4e9f0feceb192b88bc5fc0..a75d75075de175f045fd314405dfade7cfedab53 100644 (file)
@@ -1010,7 +1010,7 @@ const AppDisplay = new Lang.Class({
     },
 
     animate: function(animationDirection, onComplete) {
-        let currentView = this._views[global.settings.get_uint('app-picker-view')].view;
+        let currentView = this._views.filter(v => v.control.has_style_pseudo_class('checked')).pop().view;
 
         // Animate controls opacity using iconGrid animation time, since
         // it will be the time the AllView or FrequentView takes to show